package com.aspose.cells;

class zahm extends zaoj {
   private double a;
   private double[] b;

   public double a(double var1) {
      double var3 = 0.0D;
      double var5 = (1.0D + var1) * (1.0D + var1);

      for(int var7 = 0; var7 < this.b.length; ++var7) {
         var3 -= (double)(var7 + 1) * this.b[var7] / var5;
         var5 *= 1.0D + var1;
      }

      return var3;
   }

   public double b(double var1) {
      double var3 = this.a;
      double var5 = 1.0D + var1;

      for(int var7 = 0; var7 < this.b.length; ++var7) {
         var3 += this.b[var7] / var5;
         var5 *= 1.0D + var1;
      }

      return var3;
   }

   Object a(double var1, double[] var3, double var4) {
      this.a = var1;
      this.b = var3;
      double var6 = var1;

      for(int var8 = 0; var8 < var3.length; ++var8) {
         var6 += var3[var8];
      }

      if (var6 == 0.0D) {
         return 0.0D;
      } else {
         if (var6 > 0.0D) {
            if (var4 < 0.0D) {
               var4 = 0.1D;
            }
         } else if (var6 < 0.0D) {
            ;
         }

         double var12 = 0.0D;
         byte var10 = 1;
         int[] var11 = new int[]{var10};
         var12 = this.a(var4, 1.0E-5D, 60, var11);
         int var13 = var11[0];
         if (var13 == 2) {
            var11 = new int[]{var13};
            var12 = this.a(var4 / 2.0D, 1.0E-5D, 60, var11);
            var13 = var11[0];
         }

         if (var13 == 0) {
            return var12 + 1.0D < 0.0D ? zst.f : var12;
         } else {
            return zst.f;
         }
      }
   }
}
